import { configureStore } from '@reduxjs/toolkit'
import tokenReducer from './token'
import userInfoSlice from './userInfo'

const store = configureStore({
  reducer: {
    token: tokenReducer,
    userInfo: userInfoSlice
  }
})

export interface RootState {
  token: string
  userInfo: UserInfo | null
}

export type AppDispatch = typeof store.dispatch

export default store
